package com.qububu.utils;


/**
 * @Author:ZCW
 * @功能：系统所需常量的设置
 * @详解：
 * */
public class SystemConstants {

	// 时间常量
	public static final String DATE_PATTERN_NORMAL = "yyyy-MM-dd HH:mm:ss";
	public static final String DATE_PATTERN_SHORT_DT = "yyyy-MM-dd";
	public static final String DATE_PATTERN_SHORT_TM = "HH:mm:ss";

	//默认头像位置
	public static final String DEFAULT_USER_LOGO_URL_MAN = "/resource/images/user/man.png";
	public static final String DEFAULT_USER_LOGO_URL_WOMAN = "/resource/images/user/woman.png";
	
	// 验证登陆的过滤地址
	public static final String LOGIN_URL_VALIDATION = "";
	
	// 输入内容的长度限制
	public static final int LENGTH_LIMIT_ARTICLE_TITLE = 40;
	public static final int LENGTH_LIMIT_ARTICLE_SUMMARY = 60;
	
	public static final int LENGTH_LIMIT_POSITION_ADDR = 50;
	
	public static final int LENGTH_LIMIT_USER_LOGINID = 30;
	public static final int LENGTH_LIMIT_USER_PASSWORD = 20;
	public static final int LENGTH_LIMIT_USER_NICKNAME = 20; //为防止转义时字符增加，界面上定义10个，这里增加为20个字符
	public static final int LENGTH_LIMIT_USER_STATEMENT = 40; //为防止转义时字符增加，界面上定义30个，这里增加为40个字符
	public static final int LENGTH_LIMIT_USER_IMAGEURL = 255;

	// JSON返回结果
	public static final int AJAX_SUCCESS = 0; // 成功
	public static final int AJAX_FAILED_ALERT = 1; // 普通异常，返回不进行跳转
	public static final int AJAX_FAILED_REDIRECT = 2; // 特殊异常，返回后，要重定向
	public static final int AJAX_FAILED_ADMIN = 3; // 不是管理员，不能进行该项操作
	public static final int AJAX_FAILED_LOGIN = 999; // 没有登录的异常

	// 用户登录Session名
	public static final String LOGINUSER_SESSION_NAME = "LoginUserSessionName";
	public static final String LOGINUSER_SESSION_NAME_ADMIN = "LoginUserSessionNameAdmin";
	public static final String LOGINUSER_SESSION_LOGIN_INFO = "LoginUserSessionLoginInfo";
	public static final String LOGINUSER_SESSION_FAVOUR_POSITIONS = "LoginUserSessionFavourPositions";
	public static final String LOGINUSER_SESSION_IPCITY = "LoginUserSessionIpcity";
	public static final String LOGINUSER_SESSION_CURRENT_POSITION = "LoginUserSessionCurrentPosition";
	
	// 默认头像路径
	// public static final String DEFAULT_HEAD_IMG =
	// "images/default/default_head_img.gif";

	// 上传临时文件夹
	// public static final String DEFAULT_UPLOAD_TEMP_FOLDER = "upload/temp/";

	// 默认获取最大值
	// public static int TAG_QUERY_HOT_LIST_DEFAULT_CNT = 5; //获得热门标签的默认数量
	// public static int TAG_ADD_DEFAULT_MAX_CNT = 5; //自定义添加标签的最大值

	// 分页
	public static final int PAGE_QUERY_TEAM_CNT = 15; // 查看用户组的分页页码
	public static final int PAGE_QUERY_USER_CNT = 15; // 查看用户的分页页码
	public static final int PAGE_QUERY_ATTENDANCE_CNT = 15; // 查看用户组的分页页码
	
	//默认密码
	public static final String USER_PASSWORD_DEFAULT = "88888888";
	public static final String HoneyComb_LoginUser_Session_Name = "topUserInfo";
	
	//默认资源路径
	public static final String SYSTEM_RESOURCE_PATH_BASE = "resource/";
	public static final String SYSTEM_RESOURCE_PATH_PICTURE_EMPTY = "";
	public static final String SYSTEM_RESOURCE_PATH_PICTURE_MEDIA = "resource/images/article/media.png";
	public static final String SYSTEM_RESOURCE_PATH_USER_DEFAULT_LOGO = "resource/images/user/default_head_img.gif";
	
	//分页配置
	public static final int PAGE_VIEW_DATA_COUNT_PER_PAGE_FOR_ARTICLE_LIST = 20;
	public static final int PAGE_VIEW_DATA_COUNT_PER_PAGE_FOR_ARTICLE_DETAIL = 20;

	//加密解密
	public static final String ENCIPHERMENT = "encipherment"; //加密
	public static final String DECIPHERING = "deciphering"; //解密
	public static final String PASSWORD_KEY = "cv"; //秘钥
	public static final String WECHAT_TOKEN = "tangbin";//微信验证密匙
	
	/**
	 * @详情 session中存放的登陆者类型名
	 * */
	public static final String USER_LOGININFO = "userLoginInfo";
	
	/**
	 * @详情 管理员登录类型
	 * */
	public static final String USER_TYPE_ADMIN = "1";
	
	/**
	 * @author ZCW
	 * @详情 用于支付宝，站点名
	 * */
	public static final String ALIPAY_SERVICE = "qububu";
	/**
	 * @author ZCW
	 * @详情 alipay_config.properties中支付宝签名的key
	 * */
	public static final String ALIPAY_SIGN = "sign";
	/**
	 * @author ZCW
	 * @详情 alipay_config.properties支付宝加密方式的key
	 * */
	public static final String ALIPAY_SIGN_TYPE = "sign_type";
	/**
	 * @author ZCW
	 * @详情 alipay_config.properties支付宝数据提交的url的key
	 * */
	public static final String ALIPAY_SUBMIT_URL = "alipay_url";
	/**
	 * @author ZCW
	 * @详情 alipay_config.properties支付宝商户秘钥的key
	 * */
	public static final String ALIPAY_KEY = "alipay_key";
	/**
	 * @author ZCW
	 * @详情 alipay_config.properties支付宝交易日志文件的地址
	 * */
	public static final String ALIPAY_LOG_PATH = "alipay_log_path";
	/**
	 * @author ZCW
	 * @详情 alipay_config.properties中支付宝消息验证地址
	 * */
	public static final String ALIPAY_HTTPS_VERIFY_URL = "alipay_https_verify_url";
	
	/***************************与商品分类有关的系统常量******************************/
	
	/**
	 * @详情 区分商品评价等级
	 * */
	public static final int GOODS_POINT_GOOD = 4;
	public static final int GOODS_POINT_BAD = 2;
	
	/**
	 * 购物车的公共标示符
	 * */
	public static final String CART_IDENTIFICATION_KEY = "Content-Base";
	// 购物车中货物总价格关键字名
	public static final String CART_TOTAL_PRICE_KEY = "totalPrice";
	// 购物车中货物总数量关键字名
	public static final String CART_GOODSNUM_KEY = "cartGoodsNum";
	// 购物车商品列表关键字名
	public static final String CART_GOODS_MAP = "cartGoodsMap";
}
